/*
* @Author: ZHELIHAO\fangshuqin
* @Date:   2018-05-25 10:37:13
* @Last Modified by:   ZHELIHAO\fangshuqin
* @Last Modified time: 2018-05-25 14:47:56
*/
{
	let EVENT_CLICK = Laya.Event.CLICK;
	class SpoilsDetail extends ui.Alert.SpoilsDetailUI{

		constructor() {
			super();


			this.init();
		}

		init() {
			this.bg =  new Laya.Image("");
            // this.bg .scale(2, 2);
            this.bg.centerX = 0;
            this.bg.centerY = 0;
            this.addChildren( );

			this.registerActions();

		}

		 registerActions() {
            this.ACTIONS = {
                [GAME_CMDS.BUYGOODS] :  this.spoilsResultList ,   //购买大份荣耀战利品数据
                     
            };
            Sail.io.register(this.ACTIONS, this);
        }

		initEvent() {
			this.btn_confirm.on(EVENT_CLICK, this, ()=>{
				console.log("next");

			})

			this.btn_skip.on(EVENT_CLICK, this, ()=>{
				console.log("skip");
			});
		}

		// 大份荣耀战利品数据
        spoilsResultList(data) {
            console.log("spoilsResultList", data);
        }

	    onConfirm() {
	    	console.log("关闭")
	    	// Sail.io.unregister(this.ACTIONS);
	    	// this.close();
	    }

	}

	Sail.class(SpoilsDetail, 'Alert.SpoilsDetail');
}